import request from '@/utils/request'

const api = {
  workHoursAboutUrl: '/kpi_data_analysis/workHoursAbout',
  reportAboutUrl: '/kpi_data_analysis/report_about',
  getReportInfoUrl: '/kpi_data_analysis/get_report_info',
  getRepairSupplyUrl: '/kpi_data_analysis/get_repair_supply',
  getRepairRecordUrl: '/kpi_data_analysis/get_repair_record',
  getQmsInfoUrl: '/kpi_data_analysis/get_qms_info',
}

export async function getQmsInfoApi(params: Map<string, any>) {
  const res = await request({
    url: api.getQmsInfoUrl,
    method: 'get',
    params: params,
    timeout: 50000,
  })
  return res
}

export async function getRepairRecordApi(params: Map<string, any>) {
  const res = await request({
    url: api.getRepairRecordUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function getRepairSupplyApi(params: Map<string, any>) {
  const res = await request({
    url: api.getRepairSupplyUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function getReportInfoApi(params: Map<string, any>) {
  const res = await request({
    url: api.getReportInfoUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function reportAboutApi(params: Map<string, any>) {
  const res = await request({
    url: api.reportAboutUrl,
    method: 'get',
    params: params,
  })
  return res
}

export async function workHoursAboutApi(params: Map<string, any>) {
  const res = await request({
    url: api.workHoursAboutUrl,
    method: 'get',
    params: params,
  })
  return res
}
